<?php
if(!defined('MID_APP')) exit('Access Denied');
?>
<!-- layout::Admin:iframe/header::$tpl_cache_date -->

<!-- Start Page Header -->
<div id="page-header">
<h1>{$title}</h1>
</div>
<!-- End Page Header -->

<!-- Start Grid -->
<div class="container_12"><!-- Start Table -->
<div class="grid_12">
<div class="box-header">角色列表</div>
<div class="box table">
<table cellspacing="0">
	<thead>
		<tr>
			<td class="tc" width="30"><input type="checkbox" value="" class="checkbox" /></td>
			<td class="tl">角色名</td>
			<td class="tl" width="70">用户量</td>
			<td class="tl" widht="70">状态</td>
			<td class="tl" width="150">选项</td>
		</tr>
	</thead>
	<tbody>
      <?php
        foreach($list as $k=>$v){
            $edit = U('role/edit',array('id'=>$v['id']));
            $delete = U('role/delete',array('id'=>$v['id']));
			$accredit = U('role/accredit', array('role'=>$v['id']));
        ?>
        <tr>
			<td class="tc"><input type="checkbox" value="" class="checkbox" /></td>
			<td class="tl"> {$v['name']} </td>
			<td class="tl"> {:getRoleUserCount($v['id'])} </td>
			<td class="tl"> {:getState($v['state'])} </td>
			<td class="tl"><a href="{$accredit}" title="角色授权"><img src="{$style}img/icons/small/key.png" alt="角色授权" border="0" /></a> &nbsp; <a href="{$edit}" title="编辑角色"><img src="{$style}img/icons/small/user_edit.png" alt="编辑角色" border="0" /></a> &nbsp; <a href="{$delete}" title="删除角色"><img src="{$style}img/icons/small/user_delete.png" alt="删除角色" border="0" /></a> &nbsp;</td>
		</tr>
      <?php } ?>
      </tbody>
</table>
</div>
</div>
<!-- End Table --></div>

<!-- layout::Admin:iframe/footer::$tpl_cache_date -->